import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import {FormsModule} from "@angular/forms";
import {HttpModule} from "@angular/http";
import { HeaderComponent } from './header/header.component';
import { SidebarComponent } from './sidebar/sidebar.component';
import { FooterComponent } from './footer/footer.component';
import { ContentComponent } from './content/content.component';
import { MenuComponent } from './menu/menu.component';
import { StockMangerComponent } from './stock/stock-manger/stock-manger.component';
import { StartComponent } from './stock/start/start.component';
import {RouterModule, Routes} from "@angular/router";
import { DubbComponent } from './dubb/dubb.component';

const  routeConfig: Routes = [
  {path: '' ,   redirectTo:'/dubb' ,pathMatch: 'full'} ,
  {path: 'dubb',component:DubbComponent},
  {path: 'stock' ,component : StockMangerComponent }
];

@NgModule({
  declarations: [
    AppComponent,
    HeaderComponent,
    SidebarComponent,
    FooterComponent,
    ContentComponent,
    MenuComponent,
    StockMangerComponent,
    StartComponent,
    DubbComponent

  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    RouterModule.forRoot(routeConfig)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {

}
